package com.authorization.project.single.service.impl;

import java.util.List;

import com.authorization.project.single.domain.SingleAuthorizationServiceMapping;
import com.authorization.project.single.mapper.SingleAuthorizationServiceMappingMapper;
import com.authorization.project.single.service.ISingleAuthorizationServiceMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 单服务授权信息-服务中间Service业务层处理
 * 
 * @author 李晓雷
 * @date 2020-07-11
 */
@Service
public class SingleAuthorizationServiceMappingServiceImpl implements ISingleAuthorizationServiceMappingService
{
    @Autowired
    private SingleAuthorizationServiceMappingMapper singleAuthorizationServiceMappingMapper;

    /**
     * 查询单服务授权信息-服务中间
     * 
     * @param id 单服务授权信息-服务中间ID
     * @return 单服务授权信息-服务中间
     */
    @Override
    public SingleAuthorizationServiceMapping selectSingleAuthorizationServiceMappingById(Long id)
    {
        return singleAuthorizationServiceMappingMapper.selectSingleAuthorizationServiceMappingById(id);
    }

    /**
     * 查询单服务授权信息-服务中间列表
     * 
     * @param singleAuthorizationServiceMapping 单服务授权信息-服务中间
     * @return 单服务授权信息-服务中间
     */
    @Override
    public List<SingleAuthorizationServiceMapping> selectSingleAuthorizationServiceMappingList(SingleAuthorizationServiceMapping singleAuthorizationServiceMapping)
    {
        return singleAuthorizationServiceMappingMapper.selectSingleAuthorizationServiceMappingList(singleAuthorizationServiceMapping);
    }

    /**
     * 新增单服务授权信息-服务中间
     * 
     * @param singleAuthorizationServiceMapping 单服务授权信息-服务中间
     * @return 结果
     */
    @Override
    public int insertSingleAuthorizationServiceMapping(SingleAuthorizationServiceMapping singleAuthorizationServiceMapping)
    {
        return singleAuthorizationServiceMappingMapper.insertSingleAuthorizationServiceMapping(singleAuthorizationServiceMapping);
    }

    /**
     * 修改单服务授权信息-服务中间
     * 
     * @param singleAuthorizationServiceMapping 单服务授权信息-服务中间
     * @return 结果
     */
    @Override
    public int updateSingleAuthorizationServiceMapping(SingleAuthorizationServiceMapping singleAuthorizationServiceMapping)
    {
        return singleAuthorizationServiceMappingMapper.updateSingleAuthorizationServiceMapping(singleAuthorizationServiceMapping);
    }

    /**
     * 批量删除单服务授权信息-服务中间
     * 
     * @param ids 需要删除的单服务授权信息-服务中间ID
     * @return 结果
     */
    @Override
    public int deleteSingleAuthorizationServiceMappingByIds(Long[] ids)
    {
        return singleAuthorizationServiceMappingMapper.deleteSingleAuthorizationServiceMappingByIds(ids);
    }

    /**
     * 删除单服务授权信息-服务中间信息
     * 
     * @param id 单服务授权信息-服务中间ID
     * @return 结果
     */
    @Override
    public int deleteSingleAuthorizationServiceMappingById(Long id)
    {
        return singleAuthorizationServiceMappingMapper.deleteSingleAuthorizationServiceMappingById(id);
    }
}
